class ScheduleEventStateEntity {
  final int? autoId;
  final String? frame_id;
  final int? id;
  final int? time;
  final int? eventAutoId;

  ScheduleEventStateEntity(
      {this.autoId, this.frame_id, this.id, this.time, this.eventAutoId});

  Map<String, dynamic> toMap() {
    return {
      'autoId': autoId,
      'id': id,
      'frame_id': frame_id,
      'time': time,
      'eventAutoId': eventAutoId,
    };
  }

  key() {
    return "$frame_id$id$time";
  }

  ScheduleEventStateEntity copyWith({
    int? autoId,
    String? frame_id,
    int? id,
    int? time,
    int? eventAutoId,
  }) {
    return ScheduleEventStateEntity(
      autoId: autoId ?? this.autoId,
      frame_id: frame_id ?? this.frame_id,
      id: id ?? this.id,
      time: time ?? this.time,
      eventAutoId: eventAutoId ?? this.eventAutoId,
    );
  }

  factory ScheduleEventStateEntity.fromMap(Map<String, dynamic> map) {
    return ScheduleEventStateEntity(
      autoId: map['autoId'],
      id: map['id'],
      frame_id: map['frame_id'],
      time: map['time'],
      eventAutoId: map['eventAutoId'],
    );
  }
}
